package com.winshare.saleAssistant.domain.dto.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@ApiModel
public class AppMenuUpdateDTO {

    @NotNull(message = "应用id不可以为空")
    @Range(min = 1, message = "应用id为大于或等于0的正整数")
    @ApiModelProperty(value = "应用id不可以为空",required = true)
    private Integer appId;

    @NotBlank(message = "应用名称不可以为空")
    @Length(min = 1, max = 20, message = "应用名称长度需要在1-20个字之间")
    @ApiModelProperty(value = "应用名称")
    private String appName;

    @NotEmpty(message = "菜单列表不可以为空")
    private List<MenuDTO> menuList;

    public AppMenuUpdateDTO() {
    }

    public Integer getAppId() {
        return appId;
    }

    public void setAppId(Integer appId) {
        this.appId = appId;
    }

    public List<MenuDTO> getMenuList() {
        return menuList;
    }

    public void setMenuList(List<MenuDTO> menuList) {
        this.menuList = menuList;
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }
}
